Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

color

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color

Color conversion and manipulation with CSS string support

  • 0.11.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is color?

The 'color' npm package is a library for immutable color conversion and manipulation with support for CSS color strings.

What are color's main functionalities?

Color Parsing

Parse a CSS string to create a Color object.

const Color = require('color');
const color = Color('rgb(255, 255, 255)');

Color Manipulation

Manipulate colors by lightening, darkening, saturating, desaturating, etc., and then output as a string in a specified format.

const Color = require('color');
const color = Color('blue');
const lighterColor = color.lighten(0.5).hex();

Color Conversion

Convert colors between different models like RGB, HSL, HEX, etc.

const Color = require('color');
const color = Color('blue');
const rgbString = color.rgb().string();

Other packages similar to color

Keywords

FAQs

Package last updated on 01 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc